<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/6
 * Time: 20:55
 */
require_once "../../php/config/database.php";
require_once "userDb.php";
require_once "../admin/adminDb.php";
$adminDb=new AdminDb();
$data=$adminDb->queryNewUser();

$sum=count($data);
    try {
        $result = $data;
        if ($result) {
            $dat = array(
                'code'=>0,
                'count'=>$sum,
                'msg' =>"查询成功",
                'data'=>$data,
            );
            echo json_encode($dat);
        } else {
            $dat = array(

                'message' =>"你暂时还没有任何团队成员",

            );
            echo json_encode($dat);

        }
    }
    catch (Exception $e) {

        // 回滚事务
        // $pdo->rollback();
        echo $e->getMessage();}


